<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>NetMonitor Manual: NetMediator API</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- 制作者 Doxygen 1.5.7.1 -->
<div class="contents">
<h1>NetMediator API</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>组合类型</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct___p_a_c_k_e_t___d_a_t_a__.html">_PACKET_DATA_</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><b>_RULE_IP_PACKET_</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="struct___e_v_e_n_t___o_b_j_e_c_t__.html">_EVENT_OBJECT_</a></td></tr>

<tr><td colspan="2"><br><h2>宏定义</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g446cf449a6234c9b177309d5ba0852c0"></a><!-- doxytag: member="api::STDCALL" ref="g446cf449a6234c9b177309d5ba0852c0" args="" -->
#define&nbsp;</td><td class="memItemRight" valign="bottom"><b>STDCALL</b>&nbsp;&nbsp;&nbsp;__stdcall</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gc9dd84df24739a72a8637c8e8e0b7e8a">NMS_SUCCESS</a>&nbsp;&nbsp;&nbsp;0</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g01861687fc37c26e8a7d0e2038ad52af">NMS_FAILED</a>&nbsp;&nbsp;&nbsp;-1</td></tr>

<tr><td colspan="2"><br><h2>类型定义</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef struct <a class="el" href="struct___p_a_c_k_e_t___d_a_t_a__.html">_PACKET_DATA_</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g192d0c527024174b7d633cdc249a8fb8">PacketData</a></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g0ef30566b3c40b4783e9368b672339a4"></a><!-- doxytag: member="api::RuleIPPacket" ref="g0ef30566b3c40b4783e9368b672339a4" args="" -->
typedef struct _RULE_IP_PACKET_&nbsp;</td><td class="memItemRight" valign="bottom"><b>RuleIPPacket</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ge1c77b584a2487dd76ab222f3ea97914"></a><!-- doxytag: member="api::EventObject" ref="ge1c77b584a2487dd76ab222f3ea97914" args="" -->
typedef struct <a class="el" href="struct___e_v_e_n_t___o_b_j_e_c_t__.html">_EVENT_OBJECT_</a>&nbsp;</td><td class="memItemRight" valign="bottom"><b>EventObject</b></td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">typedef void(STDCALL *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g340d192aaa4b5eda0acd3bfd2d112f05">EventCallback</a> )(<a class="el" href="struct___e_v_e_n_t___o_b_j_e_c_t__.html">EventObject</a> eventObj)</td></tr>

<tr><td colspan="2"><br><h2>函数</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g95723bbf10b8c4a999bb92e36f9336a7">NM_insertRule</a> (const char *xmlProps)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g63d49e56b90613f596cb6826d2cacb9d">NM_updateRule</a> (const char *ruleMark, const char *xmlProps)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#ge76937454504c6ce937c21247c9999a2">NM_removeRule</a> (const char *ruleMark)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char **STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g1d232f7440df65c3f2d095352e2406e7">NM_getRuleList</a> (const char *sql, int *count)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g05e1b8fdd8b74da5ca5339f0e78715f4">NM_getRuleProps</a> (const char *ruleMark)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g43e625e6016056b580b37343308cedfa">NM_insertTask</a> (const char *xmlProps)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g6dfaae3731c12936bff9a97e6ce6df72">NM_updateTask</a> (const char *taskMark, const char *xmlProps)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#ge9d8a476e7ac6cea20bcf1d8514e5c3f">NM_removeTask</a> (const char *taskMark)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char **STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gaf6aa3b39a889acd79ca047832a84247">NM_getTaskList</a> (const char *sql, int *count)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g4f5ff91570f199133df8e3505b80ced2">NM_getTaskProps</a> (const char *taskMark)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g636a6a3f7092028f6faf3d267ee7af04">NM_insertStats</a> (const char *syntax)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g923feaec0034b9dcaeb43e40a7a75f7b">NM_updateStats</a> (const char *statsMark, const char *syntax)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g027ef993e3e4950cd238aa5a1328c39b">NM_removeStats</a> (const char *statsMark)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char **STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g27cba7ae10445bceaff5e4dc09dc699d">NM_getStatsList</a> (const char *sql, int *count)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gbfe8260434c1748fd06564e16013959e">NM_getStatsProps</a> (const char *statsMark)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g9a5dc2e015453acf7c644cb1f1b91465">NM_setAutoCommandProtocol</a> (int protocol)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g54cb4249127905cbb882c38708d5fc0a">NM_sendCommandToDevice</a> (int protocol, const char *commandString)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">long STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gbd25101c3ce7420957db28a1b9cb7913">NM_getLocalIOBytes</a> (const char *statsMark)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">long STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g233a2c23f460435411bbb2e473aa2d9e">NM_getLocalIOPackets</a> (const char *statsMark)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gf6383b87f16040e6e1510ab4c2a94e77">NM_setEventCallback</a> (<a class="el" href="group__api.html#g340d192aaa4b5eda0acd3bfd2d112f05">EventCallback</a> fireEventObj)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g66a541e47f2489ddf442fd4687208159">NM_startMonitor</a> (const char *device, int snaplen, bool promiscuous, int timeout, const char *filter)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g7682fcf359853b85d350786695db45b7">NM_stopMonitor</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g186e19e666101945a4069f212e8f375f">NM_malloc</a> (int size)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gcd5ba6215734ded329d8d28b02611d6f">NM_free</a> (void *pObject)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g3e440cc73f67d9c7b2dfef492d09face">NM_freeList</a> (char **ppObject, int count)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g5afd736f405dae04bdeaefa50f65349a">NM_openDatabase</a> (char *fileName)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#ge730f50b3e4f613d8fb3f77ac3e3a220">NM_closeDatabase</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gc1b1a9341025956b8753b9699fc8a1db">NM_hasRecordset</a> (const char *sql)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g62bfd7effd97b3064ab18121f3ceeb2e">NM_executeSQL</a> (const char *sql)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g51b9c4c6aba60c788aa2f51dc16a8827">NM_getLastError</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char **STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g9defd60589d06141d217b74be82c5499">NM_lookupDevices</a> (int *count)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gaff991d90da319084e91e01a9ca4d41d">NM_setRemoteIp</a> (char *ip)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#ga8e8e458ea8d10400e83f37efd92d331">NM_getRemoteIp</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#ga531eea7c10e1c77f50aeb8f8a0a7cb3">NM_setTelnetConfig</a> (const char *xmlProps)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g0aa039568973b9f18213e0c888f97c03">NM_getTelnetConfig</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gfa43fdfb4d2a33d8e2a96f51ae25ea11">NM_setSnmpConfig</a> (int version, char *mibspath, char *security, char *password)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g421cbe4ecd04308765d0889497b8a750">NM_getSnmpConfig</a> (int *version, char **mibspath, char **security, char **password)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gec8332d01d11db17e53bba8cec2789b1">NM_openSnmpServer</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#ga10a5531302bd305c300802ac9146bb5">NM_sendSnmpObjectMeta</a> (char *oids, int type, char *value, int len)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g41147da0b9991cebc5a7ab5cee0fa602">NM_getSnmpObjectMeta</a> (char *oids, int *type, char **ppValue, int *len)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gf93d4f0bf7253dc9080356593a206cd9">NM_closeSnmpServer</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g73361d0b314bdc385f271fec61b69a89">NM_setSSHConfig</a> (char *username, char *password, int port, char *key)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g0fccd38a955a605226a57d35788f3d46">NM_getSSHConfig</a> (char **username, char **password, int *port, char **key)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g61300fc71943ff23bee0e47d98fee869">NM_setMapEnabled</a> (bool bEnabled)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char **STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#gc1d3cfad555abb4cf584fc24e3d0b42e">NM_getIpsMapTable</a> (int *count)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">char *STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g32fe36d8b08b5f20b17daac522c90089">NM_getMacByIp</a> (char *ip)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int STDCALL&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__api.html#g5a3c0f2ee8b177b441ad3aa5e6ad652b">NM_clearIpsMapTable</a> ()</td></tr>

</table>
<hr><a name="_details"></a><h2>详细描述</h2>
NMMediator Library<p>
Copyright (C) 2007 keesion &lt;<a href="mailto:keesion@gmail.com">keesion@gmail.com</a>&gt; <hr><h2>宏定义文档</h2>
<a class="anchor" name="g01861687fc37c26e8a7d0e2038ad52af"></a><!-- doxytag: member="NMMediator.h::NMS_FAILED" ref="g01861687fc37c26e8a7d0e2038ad52af" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NMS_FAILED&nbsp;&nbsp;&nbsp;-1          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
函数执行失败状态 
</div>
</div><p>
<a class="anchor" name="gc9dd84df24739a72a8637c8e8e0b7e8a"></a><!-- doxytag: member="NMMediator.h::NMS_SUCCESS" ref="gc9dd84df24739a72a8637c8e8e0b7e8a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NMS_SUCCESS&nbsp;&nbsp;&nbsp;0          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
函数执行成功状态 
</div>
</div><p>
<hr><h2>类型定义文档</h2>
<a class="anchor" name="g340d192aaa4b5eda0acd3bfd2d112f05"></a><!-- doxytag: member="NMMediator.h::EventCallback" ref="g340d192aaa4b5eda0acd3bfd2d112f05" args=")(EventObject eventObj)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(STDCALL * <a class="el" href="group__api.html#g340d192aaa4b5eda0acd3bfd2d112f05">EventCallback</a>)(<a class="el" href="struct___e_v_e_n_t___o_b_j_e_c_t__.html">EventObject</a> eventObj)          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
事件的回调函数接口定义 
</div>
</div><p>
<a class="anchor" name="g192d0c527024174b7d633cdc249a8fb8"></a><!-- doxytag: member="NMMediator.h::PacketData" ref="g192d0c527024174b7d633cdc249a8fb8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct <a class="el" href="struct___p_a_c_k_e_t___d_a_t_a__.html">_PACKET_DATA_</a>  <a class="el" href="struct___p_a_c_k_e_t___d_a_t_a__.html">PacketData</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
IP数据包的信息 
</div>
</div><p>
<hr><h2>函数文档</h2>
<a class="anchor" name="g5a3c0f2ee8b177b441ad3aa5e6ad652b"></a><!-- doxytag: member="NMMediator.h::NM_clearIpsMapTable" ref="g5a3c0f2ee8b177b441ad3aa5e6ad652b" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_clearIpsMapTable           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
清除ip映射表，释放占用的内存 <dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ge730f50b3e4f613d8fb3f77ac3e3a220"></a><!-- doxytag: member="NMMediator.h::NM_closeDatabase" ref="ge730f50b3e4f613d8fb3f77ac3e3a220" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_closeDatabase           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
关闭数据库 <dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败<br>
 -2 数据库尚未打开 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gf93d4f0bf7253dc9080356593a206cd9"></a><!-- doxytag: member="NMMediator.h::NM_closeSnmpServer" ref="gf93d4f0bf7253dc9080356593a206cd9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_closeSnmpServer           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
关闭与SNMP Server的连接 <dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g62bfd7effd97b3064ab18121f3ceeb2e"></a><!-- doxytag: member="NMMediator.h::NM_executeSQL" ref="g62bfd7effd97b3064ab18121f3ceeb2e" args="(const char *sql)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_executeSQL           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>sql</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
执行一条sql语句 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sql</em>&nbsp;</td><td>要执行的sql语句 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gcd5ba6215734ded329d8d28b02611d6f"></a><!-- doxytag: member="NMMediator.h::NM_free" ref="gcd5ba6215734ded329d8d28b02611d6f" args="(void *pObject)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void STDCALL NM_free           </td>
          <td>(</td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>pObject</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
释放内存 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pObject</em>&nbsp;</td><td>要释要的内存地址 </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g3e440cc73f67d9c7b2dfef492d09face"></a><!-- doxytag: member="NMMediator.h::NM_freeList" ref="g3e440cc73f67d9c7b2dfef492d09face" args="(char **ppObject, int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void STDCALL NM_freeList           </td>
          <td>(</td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>ppObject</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
释放列表内存 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ppObject</em>&nbsp;</td><td>列表首地址 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>字串列表中字串的数量 </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="gc1d3cfad555abb4cf584fc24e3d0b42e"></a><!-- doxytag: member="NMMediator.h::NM_getIpsMapTable" ref="gc1d3cfad555abb4cf584fc24e3d0b42e" args="(int *count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char** STDCALL NM_getIpsMapTable           </td>
          <td>(</td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>count</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
获取通过Device上的IP映射表 <dl class="return" compact><dt><b>返回:</b></dt><dd>Device上的IP映射表 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g51b9c4c6aba60c788aa2f51dc16a8827"></a><!-- doxytag: member="NMMediator.h::NM_getLastError" ref="g51b9c4c6aba60c788aa2f51dc16a8827" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* STDCALL NM_getLastError           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
返回最后一条错误信息 
</div>
</div><p>
<a class="anchor" name="gbd25101c3ce7420957db28a1b9cb7913"></a><!-- doxytag: member="NMMediator.h::NM_getLocalIOBytes" ref="gbd25101c3ce7420957db28a1b9cb7913" args="(const char *statsMark)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long STDCALL NM_getLocalIOBytes           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>statsMark</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
读取本地的系统网络数据流量 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>statsMark</em>&nbsp;</td><td>统计规则的md5标识串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>数据流量，单位为byte </dd></dl>

</div>
</div><p>
<a class="anchor" name="g233a2c23f460435411bbb2e473aa2d9e"></a><!-- doxytag: member="NMMediator.h::NM_getLocalIOPackets" ref="g233a2c23f460435411bbb2e473aa2d9e" args="(const char *statsMark)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long STDCALL NM_getLocalIOPackets           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>statsMark</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
读取本地的系统网络数据包个数 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>statsMark</em>&nbsp;</td><td>统计规则的md5标识串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>数据包个数 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g32fe36d8b08b5f20b17daac522c90089"></a><!-- doxytag: member="NMMediator.h::NM_getMacByIp" ref="g32fe36d8b08b5f20b17daac522c90089" args="(char *ip)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_getMacByIp           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>ip</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
根据ip取得对应的mac <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ip</em>&nbsp;</td><td>ip字串，由getIpsMapTable返回的列表中挑选 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>　mac </dd></dl>

</div>
</div><p>
<a class="anchor" name="ga8e8e458ea8d10400e83f37efd92d331"></a><!-- doxytag: member="NMMediator.h::NM_getRemoteIp" ref="ga8e8e458ea8d10400e83f37efd92d331" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_getRemoteIp           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
获取远程设备ip <dl class="return" compact><dt><b>返回:</b></dt><dd>远程设备ip </dd></dl>

</div>
</div><p>
<a class="anchor" name="g1d232f7440df65c3f2d095352e2406e7"></a><!-- doxytag: member="NMMediator.h::NM_getRuleList" ref="g1d232f7440df65c3f2d095352e2406e7" args="(const char *sql, int *count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char** STDCALL NM_getRuleList           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
根据SQL查询语句获取规则标识列表 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sql</em>&nbsp;</td><td>标准SQL查询语句。 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>返回规则的数量 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>由规则的标识串组成的String数组<br>
 用完后，用NM_freeList释放内存 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g05e1b8fdd8b74da5ca5339f0e78715f4"></a><!-- doxytag: member="NMMediator.h::NM_getRuleProps" ref="g05e1b8fdd8b74da5ca5339f0e78715f4" args="(const char *ruleMark)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_getRuleProps           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>ruleMark</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
获得指定规则的属性信息 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ruleMark</em>&nbsp;</td><td>由insertRule返回的MD5标识串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>xml结构的规则属性信息 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g421cbe4ecd04308765d0889497b8a750"></a><!-- doxytag: member="NMMediator.h::NM_getSnmpConfig" ref="g421cbe4ecd04308765d0889497b8a750" args="(int *version, char **mibspath, char **security, char **password)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_getSnmpConfig           </td>
          <td>(</td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>mibspath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>security</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>password</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
获取SNMP配置信息 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>version</em>&nbsp;</td><td>版本号 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mibspath</em>&nbsp;</td><td>mib存放路径 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>security</em>&nbsp;</td><td>如果是V1就是PUBLIC，如果是V3就是用户名 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>v3, 用户密码 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g41147da0b9991cebc5a7ab5cee0fa602"></a><!-- doxytag: member="NMMediator.h::NM_getSnmpObjectMeta" ref="g41147da0b9991cebc5a7ab5cee0fa602" args="(char *oids, int *type, char **ppValue, int *len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_getSnmpObjectMeta           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>oids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>ppValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
读取路由中指定OID的值 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>oids</em>&nbsp;</td><td>MIB OID,形式".1.3.6.1.2.1.1.5.1.0" </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>值的类型,比如0x04为字符串类型 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ppValue</em>&nbsp;</td><td>存放返回值的缓冲区指针 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>存放返回值的缓冲区指针的长度 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g0fccd38a955a605226a57d35788f3d46"></a><!-- doxytag: member="NMMediator.h::NM_getSSHConfig" ref="g0fccd38a955a605226a57d35788f3d46" args="(char **username, char **password, int *port, char **key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_getSSHConfig           </td>
          <td>(</td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **&nbsp;</td>
          <td class="paramname"> <em>key</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
获取SSH配置信息 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>用户名 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>密码 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>port</em>&nbsp;</td><td>SSH Server端口号 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>SSH Private Key </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g27cba7ae10445bceaff5e4dc09dc699d"></a><!-- doxytag: member="NMMediator.h::NM_getStatsList" ref="g27cba7ae10445bceaff5e4dc09dc699d" args="(const char *sql, int *count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char** STDCALL NM_getStatsList           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
根据SQL查询语句获取统计规则的标识列表 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sql</em>&nbsp;</td><td>标准SQL查询语句。 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>返回统计规则的数量 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>由统计规则的标识串组成的String数组 用完后，用NM_freeList释放内存 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gbfe8260434c1748fd06564e16013959e"></a><!-- doxytag: member="NMMediator.h::NM_getStatsProps" ref="gbfe8260434c1748fd06564e16013959e" args="(const char *statsMark)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_getStatsProps           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>statsMark</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
获得指定统计规则的属性信息 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>statsMark</em>&nbsp;</td><td>由insertStats返回的MD5标识串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>统计规则的语法 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gaf6aa3b39a889acd79ca047832a84247"></a><!-- doxytag: member="NMMediator.h::NM_getTaskList" ref="gaf6aa3b39a889acd79ca047832a84247" args="(const char *sql, int *count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char** STDCALL NM_getTaskList           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>count</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
根据SQL查询语句获取任务的标识列表 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sql</em>&nbsp;</td><td>标准SQL查询语句。 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>返回规则的数量 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>由任务的标识串组成的String数组 用完后，用NM_freeList释放内存 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g4f5ff91570f199133df8e3505b80ced2"></a><!-- doxytag: member="NMMediator.h::NM_getTaskProps" ref="g4f5ff91570f199133df8e3505b80ced2" args="(const char *taskMark)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_getTaskProps           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>taskMark</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
获得指定任务的属性信息 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>taskMark</em>&nbsp;</td><td>由insertTask返回的MD5标识串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>xml结构的任务属性信息 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g0aa039568973b9f18213e0c888f97c03"></a><!-- doxytag: member="NMMediator.h::NM_getTelnetConfig" ref="g0aa039568973b9f18213e0c888f97c03" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_getTelnetConfig           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
获取Telnet配置信息 <dl class="return" compact><dt><b>返回:</b></dt><dd>返回Telnet的XML配置信息 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gc1b1a9341025956b8753b9699fc8a1db"></a><!-- doxytag: member="NMMediator.h::NM_hasRecordset" ref="gc1b1a9341025956b8753b9699fc8a1db" args="(const char *sql)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool STDCALL NM_hasRecordset           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>sql</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
判断是否存在记录 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>sql</em>&nbsp;</td><td>查询的SQL语句 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>true &lt;=&gt; 存在<br>
 false &lt;=&gt; 不存在 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g95723bbf10b8c4a999bb92e36f9336a7"></a><!-- doxytag: member="NMMediator.h::NM_insertRule" ref="g95723bbf10b8c4a999bb92e36f9336a7" args="(const char *xmlProps)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_insertRule           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>xmlProps</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
加入一条规则 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>xmlProps</em>&nbsp;</td><td>xml结构的规则属性信息 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>对传入数据进行MD5加密后所得的16进制字符串，做为每条规则的唯一标识<br>
 注意：本函数的返回指针不需要释放 返回NULL的时候说明执行失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g636a6a3f7092028f6faf3d267ee7af04"></a><!-- doxytag: member="NMMediator.h::NM_insertStats" ref="g636a6a3f7092028f6faf3d267ee7af04" args="(const char *syntax)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_insertStats           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>syntax</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
加入一条统计规则 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>syntax</em>&nbsp;</td><td>统计规则的语法 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>对传入数据进行MD5加密后所得的16进制字符串 注意：本函数的返回指针不需要释放 返回NULL的时候说明执行失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g43e625e6016056b580b37343308cedfa"></a><!-- doxytag: member="NMMediator.h::NM_insertTask" ref="g43e625e6016056b580b37343308cedfa" args="(const char *xmlProps)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char* STDCALL NM_insertTask           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>xmlProps</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
加入一项任务 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>xmlProps</em>&nbsp;</td><td>xml结构的任务属性信息 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>对传入数据进行MD5加密后所得的16进制字符串，做为每项任务的唯一标识 注意：本函数的返回指针不需要释放 返回NULL的时候说明执行失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g9defd60589d06141d217b74be82c5499"></a><!-- doxytag: member="NMMediator.h::NM_lookupDevices" ref="g9defd60589d06141d217b74be82c5499" args="(int *count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char** STDCALL NM_lookupDevices           </td>
          <td>(</td>
          <td class="paramtype">int *&nbsp;</td>
          <td class="paramname"> <em>count</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
返回所有网卡的名称 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>count</em>&nbsp;</td><td>网卡数量 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>网卡名称列表 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g186e19e666101945a4069f212e8f375f"></a><!-- doxytag: member="NMMediator.h::NM_malloc" ref="g186e19e666101945a4069f212e8f375f" args="(int size)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void* STDCALL NM_malloc           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>size</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
分配内存 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>要分配的内存的大小 </td></tr>
  </table>
</dl>

</div>
</div><p>
<a class="anchor" name="g5afd736f405dae04bdeaefa50f65349a"></a><!-- doxytag: member="NMMediator.h::NM_openDatabase" ref="g5afd736f405dae04bdeaefa50f65349a" args="(char *fileName)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_openDatabase           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>fileName</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
打开数据库 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fileName</em>&nbsp;</td><td>数据文件名，为NULL时，以默认文件名(NMConfig.db)打开 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gec8332d01d11db17e53bba8cec2789b1"></a><!-- doxytag: member="NMMediator.h::NM_openSnmpServer" ref="gec8332d01d11db17e53bba8cec2789b1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_openSnmpServer           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
与SNMP Server连接 <dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ge76937454504c6ce937c21247c9999a2"></a><!-- doxytag: member="NMMediator.h::NM_removeRule" ref="ge76937454504c6ce937c21247c9999a2" args="(const char *ruleMark)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_removeRule           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>ruleMark</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
删除一条规则 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ruleMark</em>&nbsp;</td><td>由insertRule返回的MD5标识串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g027ef993e3e4950cd238aa5a1328c39b"></a><!-- doxytag: member="NMMediator.h::NM_removeStats" ref="g027ef993e3e4950cd238aa5a1328c39b" args="(const char *statsMark)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_removeStats           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>statsMark</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
删除一条统计规则 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>statsMark</em>&nbsp;</td><td>由insertStats返回的MD5标识串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ge9d8a476e7ac6cea20bcf1d8514e5c3f"></a><!-- doxytag: member="NMMediator.h::NM_removeTask" ref="ge9d8a476e7ac6cea20bcf1d8514e5c3f" args="(const char *taskMark)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_removeTask           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>taskMark</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
删除一项任务 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>taskMark</em>&nbsp;</td><td>由insertTask返回的MD5标识串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g54cb4249127905cbb882c38708d5fc0a"></a><!-- doxytag: member="NMMediator.h::NM_sendCommandToDevice" ref="g54cb4249127905cbb882c38708d5fc0a" args="(int protocol, const char *commandString)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_sendCommandToDevice           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>protocol</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>commandString</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
给设备发送一条指令 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>protocol</em>&nbsp;</td><td>发送的协议<br>
 1). protocol=0x01, 用SSH协议发送<br>
 2). protocol=0x02, 用Telnet协议发送 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>commandString</em>&nbsp;</td><td>设备支持的命令字符串 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ga10a5531302bd305c300802ac9146bb5"></a><!-- doxytag: member="NMMediator.h::NM_sendSnmpObjectMeta" ref="ga10a5531302bd305c300802ac9146bb5" args="(char *oids, int type, char *value, int len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_sendSnmpObjectMeta           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>oids</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>len</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
根据oids设置路由中的对应值 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>oids</em>&nbsp;</td><td>MIB OID,形式".1.3.6.1.2.1.1.5.1.0" </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>type</em>&nbsp;</td><td>值的类型,比如0x04为字符串类型 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>值的缓冲区指针 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>值的缓冲区指针的长度 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g9a5dc2e015453acf7c644cb1f1b91465"></a><!-- doxytag: member="NMMediator.h::NM_setAutoCommandProtocol" ref="g9a5dc2e015453acf7c644cb1f1b91465" args="(int protocol)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_setAutoCommandProtocol           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>protocol</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
设置用什么协议发送系统的自动命令 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>protocol</em>&nbsp;</td><td>发送的协议<br>
 1). protocol=0x01, 用SSH协议发送<br>
 2). protocol=0x02, 用Telnet协议发送 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gf6383b87f16040e6e1510ab4c2a94e77"></a><!-- doxytag: member="NMMediator.h::NM_setEventCallback" ref="gf6383b87f16040e6e1510ab4c2a94e77" args="(EventCallback fireEventObj)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void STDCALL NM_setEventCallback           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__api.html#g340d192aaa4b5eda0acd3bfd2d112f05">EventCallback</a>&nbsp;</td>
          <td class="paramname"> <em>fireEventObj</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
设置警告或日志事件对象 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>EventCallback</em>&nbsp;</td><td>回调函数原型 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>NULL(void) </dd></dl>

</div>
</div><p>
<a class="anchor" name="g61300fc71943ff23bee0e47d98fee869"></a><!-- doxytag: member="NMMediator.h::NM_setMapEnabled" ref="g61300fc71943ff23bee0e47d98fee869" args="(bool bEnabled)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_setMapEnabled           </td>
          <td>(</td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>bEnabled</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
设置是否对数据包进行 ip&lt;=&gt;mac 的提取 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>bEnabled</em>&nbsp;</td><td>true 开始提取<br>
 false 停止提取 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gaff991d90da319084e91e01a9ca4d41d"></a><!-- doxytag: member="NMMediator.h::NM_setRemoteIp" ref="gaff991d90da319084e91e01a9ca4d41d" args="(char *ip)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_setRemoteIp           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>ip</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
设置远程设备ip <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ip</em>&nbsp;</td><td>远程设备ip </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="gfa43fdfb4d2a33d8e2a96f51ae25ea11"></a><!-- doxytag: member="NMMediator.h::NM_setSnmpConfig" ref="gfa43fdfb4d2a33d8e2a96f51ae25ea11" args="(int version, char *mibspath, char *security, char *password)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_setSnmpConfig           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>mibspath</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>security</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>password</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
设置SNMP配置信息 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>version</em>&nbsp;</td><td>版本号 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>mibspath</em>&nbsp;</td><td>mib存放路径 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>security</em>&nbsp;</td><td>如果是V1就是PUBLIC，如果是V3就是用户名 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>v3, 用户密码 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g73361d0b314bdc385f271fec61b69a89"></a><!-- doxytag: member="NMMediator.h::NM_setSSHConfig" ref="g73361d0b314bdc385f271fec61b69a89" args="(char *username, char *password, int port, char *key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_setSSHConfig           </td>
          <td>(</td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>username</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>key</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
设置SSH配置信息 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>username</em>&nbsp;</td><td>用户名 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>password</em>&nbsp;</td><td>密码 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>port</em>&nbsp;</td><td>SSH Server端口号 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>SSH Private Key </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="ga531eea7c10e1c77f50aeb8f8a0a7cb3"></a><!-- doxytag: member="NMMediator.h::NM_setTelnetConfig" ref="ga531eea7c10e1c77f50aeb8f8a0a7cb3" args="(const char *xmlProps)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_setTelnetConfig           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>xmlProps</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
设置Telnet配置信息 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>xmlProps</em>&nbsp;</td><td>Telnet的XML配置信息 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g66a541e47f2489ddf442fd4687208159"></a><!-- doxytag: member="NMMediator.h::NM_startMonitor" ref="g66a541e47f2489ddf442fd4687208159" args="(const char *device, int snaplen, bool promiscuous, int timeout, const char *filter)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_startMonitor           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>device</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>snaplen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>promiscuous</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>timeout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>filter</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
启动网络数据监控 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>device</em>&nbsp;</td><td>网卡的名称(friendly name) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>snaplen</em>&nbsp;</td><td>要监控的数据包总长度, 满足长度后停止监控 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>promiscuous</em>&nbsp;</td><td>是否要混合监听模式 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>timeout</em>&nbsp;</td><td>读取网络包的超时时间 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filter</em>&nbsp;</td><td>过滤语法 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g7682fcf359853b85d350786695db45b7"></a><!-- doxytag: member="NMMediator.h::NM_stopMonitor" ref="g7682fcf359853b85d350786695db45b7" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_stopMonitor           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
停止网络数据监控 <dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g63d49e56b90613f596cb6826d2cacb9d"></a><!-- doxytag: member="NMMediator.h::NM_updateRule" ref="g63d49e56b90613f596cb6826d2cacb9d" args="(const char *ruleMark, const char *xmlProps)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_updateRule           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>ruleMark</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>xmlProps</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
更新一条规则 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ruleMark</em>&nbsp;</td><td>由insertRule返回的MD5标识串 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>xmlProps</em>&nbsp;</td><td>xml结构的规则属性信息 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g923feaec0034b9dcaeb43e40a7a75f7b"></a><!-- doxytag: member="NMMediator.h::NM_updateStats" ref="g923feaec0034b9dcaeb43e40a7a75f7b" args="(const char *statsMark, const char *syntax)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_updateStats           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>statsMark</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>syntax</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
更新一条统计规则 <dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>statsMark</em>&nbsp;</td><td>由insertStats返回的md5标识串 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>syntax</em>&nbsp;</td><td>统计规则的语法 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
<a class="anchor" name="g6dfaae3731c12936bff9a97e6ce6df72"></a><!-- doxytag: member="NMMediator.h::NM_updateTask" ref="g6dfaae3731c12936bff9a97e6ce6df72" args="(const char *taskMark, const char *xmlProps)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int STDCALL NM_updateTask           </td>
          <td>(</td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>taskMark</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>xmlProps</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b>参数:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>taskMark</em>&nbsp;</td><td>由insertTask返回的md5标识串 </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>xmlProps</em>&nbsp;</td><td>xml结构的任务属性信息 </td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>返回:</b></dt><dd>0 函数执行成功<br>
 -1 操作失败 </dd></dl>

</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated at Tue Feb 24 16:15:29 2009 for NetMonitor Manual by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.7.1 </small></address>
</body>
</html>
